import request from '@/utils/request'

// 查询采购单明细列表
export function listOrderDetail(query) {
  return request({
    url: '/purchase/order/detail/list',
    method: 'get',
    params: query
  })
}

// 查询采购单明细详细
export function getOrderDetail(id) {
  return request({
    url: '/purchase/order/detail/' + id,
    method: 'get'
  })
}

// 新增采购单明细
export function addOrderDetail(data) {
  return request({
    url: '/purchase/order/detail',
    method: 'post',
    data: data
  })
}

// 修改采购单明细
export function updateOrderDetail(data) {
  return request({
    url: '/purchase/order/detail',
    method: 'put',
    data: data
  })
}

// 删除采购单明细
export function delOrderDetail(id) {
  return request({
    url: '/purchase/order/detail/' + id,
    method: 'delete'
  })
}


export function historyPrices(data) {
  return request({
    url: '/purchase/order/detail/prices',
    method: 'post',
    data: data
  })
}


// 修改采购单明细
export function toSaveStore(data) {
  return request({
    url: '/purchase/order/detail/toStore',
    method: 'post',
    data: data
  })
}
